<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>

    </style>
</head>
<body>

</body>
</html>
<script !src="">
    // 页面滚动事件
    window.addEventListener('scroll',function (){
    //     // console.log('我滚动了')
    //     // 页面滚动到底是谁在滚动? HTML 元素 => document.documentElement
    //     // 如何获取滚动出去的距离? scrollTop 顶部距离 / scrollLeft 左侧距离
    //     console.log(document.documentElement.scrollTop+'上下滚动距离')
    //     console.log(document.documentElement.scrollLeft+'左右滚动距离')
    // })

</script>